package org.msss.resource;

import java.io.IOException;

import org.newdawn.slick.opengl.TextureLoader;
import org.newdawn.slick.util.ResourceLoader;
import org.newdawn.slick.opengl.Texture;


/**
 * This class will store all of the images as global variables, for easy access
 * to images.
 * 
 * @author alanxoc3
 * 
 */
public final class ImageDB {
	
	public static Texture bkg_1;
	public static Texture bkg_2;
	
	public static Texture head_down;
	public static Texture head_left;
	public static Texture head_up;
	public static Texture head_right;
	
	public static void init() {
		try {
			bkg_1 = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/image/test1.png"));
			bkg_2 = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/image/test2.png"));
			
			head_down = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/image/head_down.png"));
			head_left = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/image/head_left.png"));
			head_up = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/image/head_up.png"));
			head_right = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/image/head_right.png"));
		}
		catch (IOException ioe) {
			ioe.printStackTrace();
		}
	}
}
